<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>大象与猩猩 | 找回密码</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="stylesheet" href="pure/pure-min.css">
<style type="text/css">
.div {
	margin: 0 auto;
	width: 600px;
}
</style>
</head>
<body>
	<div class="div">
		<h2>店长 找回密码</h2>
		<hr />
	</div>
	<div class="pure-g" style="padding: 2em 1em 0;">
		<div class="pure-u-1 div">
			<form id="submitForm" class="pure-form pure-form-aligned pure-u-1">
				<div class="pure-control-group">
					<div class="pure-u-1">手机号：</div>
					<p></p>
					<div class="pure-u-1">
						<input required="required" maxlength="11" placeholder="请输入手机号" id="phone" name="phone" type="tel" class="pure-input-2-3">
						<button id="send" class="pure-button" onclick="sendCode()">发送</button>
					</div>
				</div>
			</form>
		</div>
	</div>

	<script src="assets/js/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		function sendCode() {
			event.preventDefault();
			var phone = $("#phone").val();
			if(phone==""){
				alert("请输入手机号！");
				return;
			}
			$.ajax({
				type : "POST",
				url : "../sendpassword",
				data : $.param({
					"phone" : phone,
					"type" : "Getback"
				}),
				dataType : "json",
				success : function(data) {
						alert(data.info);
						window.location.href='admin-login.html';
				},
				error : function(data) {
				}
			});
		}
	</script>
</body>
</html>